<%--
  Created by IntelliJ IDEA.
  User: mrcode
  Date: 2015/11/11
  Time: 22:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%@ taglib prefix="security" uri="/security" %>
<html>
<head>
    <title>首页</title>
</head>
<body>
<security:guest>
    <p>身份：游客</p>
    <a href="<c:url value='/login' />">登录</a>
    <a href="<c:url value='/register' />">注册</a>
</security:guest>

<security:user>
    <p>身份：<shiro:principal/></p>
    <a href="<c:url value='/customer' />">查询客户列表</a>
    <a href="<c:url value='/logout' />">退出</a>
</security:user>

<security:hasAllRoles name="sys">
    有user权限
</security:hasAllRoles>

</body>
</html>
